On Wed, Sep 01, 2010 at 12:03:36PM +0100, Mark Cave-Ayland wrote: > Denis Rykov wrote: > > >ERROR: Could not determine geometry type (empty table). > >Done (postgis major version: 2). > >Output shape: Null Shape > >Dumping: [0 rows]. > > Checking the resulting file size is not the right way to be trying to > detect whether the query returned > 0 rows. It strikes me that the best > way to detect this would be to return a different exit code from > pgsql2shp if no rows are returned - would this work for you?
I'd go stricter to "if an ERROR occurred" rather than "if no rows are returned". Just in case one day we'll add a flag to specify the geometry type thus allowing creation of empty-but-structuted shapefiles starting from a table "template". --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users